package com.woniu.account.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class RegistryGymAccountForm {
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    private String accountName;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(max = 20, message = "密码不能超过20个字符")
    @Length(min = 6, message = "密码不能小于6个字符")
    private String accountPass;

    /**
     * 电话
     */

    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String accountPhone;

    /**
     * 邮箱
     */

    @Email(message = "邮箱格式错误")
    private String accountEmail;
    @NotBlank(message = "验证码不能为空")
    private String code;


}
